package com.meida.module.bus.client.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.NoArgsConstructor;

/**
 * 会员卡状态
 *
 * @author jzy
 * @date 2021/7/9
 */
@NoArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum VipCardStateEnum {

    daiJiHuo(0, "待激活"),
    zhengChang(1, "正常"),
    yiGuoQi(2, "已过期"),
    weiKaiTong(3, "未开通"),
    weiTongGuo(4, "未通过"),
    dongJie(5, "冻结"),
    TuiKaZhong(6, "退卡中"),
    yiTuiKa(7, "已退卡"),
    yiZhuanKa(8, "已转卡"),
    yiZhuanZheng(9, "已转赠");

    private Integer vipCardState;

    @ApiModelProperty("描述")
    private String label;

    VipCardStateEnum(Integer vipCardState, String label) {
        this.vipCardState = vipCardState;
        this.label = label;
    }

    public Integer getVipCardState() {
        return vipCardState;
    }

    public void setVipCardState(Integer vipCardState) {
        this.vipCardState = vipCardState;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static VipCardStateEnum getByValue(Integer value) {
        for (VipCardStateEnum vipCardStateEnum : values()) {
            if (vipCardStateEnum.getVipCardState() == value) {
                return vipCardStateEnum;
            }
        }
        return null;
    }
}
